package net.lanelife.casino.caipiao.service;

import net.lanelife.casino.caipiao.entity.LotteryNumber;
import net.lanelife.casino.caipiao.repository.api.ILotteryNumberRepository;
import net.lanelife.casino.caipiao.service.api.ILotteryNumberService;
import net.lanelife.casino.common.repository.support.GenericRepository;
import net.lanelife.casino.common.service.support.GenericService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LotteryNumberService extends GenericService<LotteryNumber, Integer> implements ILotteryNumberService {
	
	@Autowired
	private ILotteryNumberRepository repository;
	
	public LotteryNumberService() {
		super(LotteryNumber.class);
	}
	
	@Override
	protected GenericRepository<LotteryNumber, Integer> getRepository() {
		return repository;
	}

	public LotteryNumber find(Integer gameId, String issue) {
		return repository.findByGameIdAndIssue(gameId, issue);
	}


	

}
